add_gdal_driver(TARGET ogr_Elastic SOURCES ogr_elastic.h ogrelasticdatasource.cpp ogrelasticdriver.cpp
                                           ogrelasticlayer.cpp PLUGIN_CAPABLE_IF "NOT GDAL_USE_LIBJSONC_INTERNAL")
gdal_standard_includes(ogr_Elastic)
target_include_directories(ogr_Elastic PRIVATE ${GDAL_VECTOR_FORMAT_SOURCE_DIR}/geojson)
if (GDAL_USE_LIBJSONC_INTERNAL)
  target_include_directories(ogr_Elastic PRIVATE $<TARGET_PROPERTY:libjson,SOURCE_DIR>)
else ()
  target_include_directories(ogr_Elastic PRIVATE ${JSONC_INCLUDE_DIR})
  gdal_target_link_libraries(TARGET ogr_Elastic LIBRARIES JSONC::JSONC)
endif ()
